package cm.day08;

import java.util.*;

public class Test8 {
    public static void main(String[] args) {
        // 创建年级集合
        List<Map<Integer, Student>> list = new ArrayList<>();
        //创建第一个班级
        Map<Integer, Student> map1 = new HashMap<>();

        map1.put(11, new Student("张三", 11, 90.3));
        map1.put(12, new Student("李四", 12, 89.2));
        map1.put(13, new Student("王五", 13, 89.4));
        list.add(map1);
        Map<Integer, Student> map2 = new HashMap<>();
        map2.put(14, new Student("熊大", 14, 89.7));
        map2.put(15, new Student("熊二", 15, 89.0));
        list.add(map2);
        for (Map<Integer, Student> maps : list) {
            Set<Integer> set = maps.keySet();
            for (Integer id : set) {
                Student student = maps.get(id);
                System.out.println(id + "---" + student);
            }
        }
    }

}
